/**
 * 
 *//*
package com.cipe.cmrs.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cipe.cmrs.model.Theme;
import com.cipe.cmrs.model.User;
import com.cipe.cmrs.util.DateUtil;

*//**
 * @author Incepio
 *//*
@Service
@Transactional
public class ThemeService extends BaseService<Theme> {

	@Autowired
	private UserService	userService;

	public Theme saveTheme(Theme theme, Integer userId) {
		if (theme != null) {
			User user = userService.findById(userId);
			Theme dbTheme = findById(theme.getId());
			if (dbTheme == null) {
				dbTheme = new Theme();
				dbTheme.setCreatedBy(user);
				dbTheme.setCreationDate(DateUtil.getCurrentDate());
			}
			dbTheme.setDisplayName(theme.getDisplayName());
			dbTheme.setDescription(theme.getDescription());
			dbTheme.setUpdatedBy(user);
			dbTheme.setUpdationDate(DateUtil.getCurrentDate());
			return merge(dbTheme);
		}
		return null;
	}
}
*/